package com.example.hzly.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.hzly.dto.RouteDTO;
import com.example.hzly.dto.RouteReviewDTO;
import com.example.hzly.entity.Route;
import com.example.hzly.entity.RouteReview;

import java.util.List;
import java.util.Map;

public interface RouteService extends IService<Route> {
    
    RouteDTO getRouteDetail(Long id);
    
    /**
     * 分页查询路线列表（支持筛选）
     */
    IPage<RouteDTO> pageRoutes(Integer page, Integer size, String theme, String difficulty, Integer duration, String sort);
    
    /**
     * 获取路线筛选选项
     */
    Map<String, Object> getFilterOptions();
    
    IPage<RouteDTO> getRouteList(Page<Route> page);
    
    IPage<RouteDTO> getHotRoutes(Page<Route> page);
    
    IPage<RouteDTO> getRoutesByDestination(Long destinationId, Page<Route> page);
    
    IPage<RouteDTO> getRoutesByTheme(String theme, Page<Route> page);
    
    IPage<RouteDTO> getRoutesByDifficulty(String difficulty, Page<Route> page);
    
    IPage<RouteDTO> searchRoutes(String keyword, Page<Route> page);
    
    List<RouteDTO> getRelatedRoutes(Long destinationId, Integer limit);
    
    List<String> getAllThemes();
    
    IPage<RouteReviewDTO> getRouteReviews(Long routeId, Page<RouteReview> page);
    
    Map<String, Object> getRouteStats();
    
    void incrementBookCount(Long id);
    
    void addReview(RouteReview review);
    
    void deleteReview(Long reviewId, String name);
    
    List<RouteReviewDTO> getNestedReviews(Long routeId);
}